﻿<?xml version="1.0" encoding="utf-8" ?>
<ArrayOfSolutionConfigurationDataTypeTemplate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SolutionGenerator">
  <SolutionConfigurationDataTypeTemplate>
    <DataType>Boolean</DataType>
    <DefaultValueMap xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>((0))</d3p1:Key>
        <d3p1:Value>false</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>((1))</d3p1:Key>
        <d3p1:Value>true</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </DefaultValueMap>
    <TemplateIsRequired xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
    <TemplateReplace xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>0</d3p1:Key>
        <d3p1:Value>bool</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>1</d3p1:Key>
        <d3p1:Value>{TableName}{ColumnName}Input.Checked = entity.{ColumnName}</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>2</d3p1:Key>
        <d3p1:Value>entity.{ColumnName} = {TableName}{ColumnName}Input.Checked</d3p1:Value>
      </d3p1:KeyValueOfintstring>
    </TemplateReplace>
  </SolutionConfigurationDataTypeTemplate>
  <SolutionConfigurationDataTypeTemplate>
    <DataType>VarChar</DataType>
    <DefaultValueMap xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
    <TemplateIsRequired xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
    <TemplateReplace xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>0</d3p1:Key>
        <d3p1:Value>string</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>1</d3p1:Key>
        <d3p1:Value>{TableName}{ColumnName}Input.Text = entity.{ColumnName}</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>2</d3p1:Key>
        <d3p1:Value>entity.{ColumnName} = {TableName}{ColumnName}Input.Text</d3p1:Value>
      </d3p1:KeyValueOfintstring>
    </TemplateReplace>
  </SolutionConfigurationDataTypeTemplate>
  <SolutionConfigurationDataTypeTemplate>
    <DataType>Char</DataType>
    <DefaultValueMap xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
    <TemplateIsRequired xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
    <TemplateReplace xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>0</d3p1:Key>
        <d3p1:Value>string</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>1</d3p1:Key>
        <d3p1:Value>{TableName}{ColumnName}Input.Text = entity.{ColumnName}</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>2</d3p1:Key>
        <d3p1:Value>entity.{ColumnName} = {TableName}{ColumnName}Input.Text</d3p1:Value>
      </d3p1:KeyValueOfintstring>
    </TemplateReplace>
  </SolutionConfigurationDataTypeTemplate>
  <SolutionConfigurationDataTypeTemplate>
    <DataType>Integer</DataType>
    <DefaultValueMap xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
    <TemplateIsRequired xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
    <TemplateReplace xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>0</d3p1:Key>
        <d3p1:Value>int</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>1</d3p1:Key>
        <d3p1:Value>{TableName}{ColumnName}Input.Text = entity.{ColumnName}.ToString("#,##0.#")</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>2</d3p1:Key>
        <d3p1:Value>entity.{ColumnName} = int.Parse({TableName}{ColumnName}Input.Text);</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>3</d3p1:Key>
        <d3p1:Value>Fill{ColumnName}(db);
          {ForeignKeyParentTableName}{ForeignKeyParentColumnName}Input.SelectedValue = entity.{ColumnName}.ToString()
        </d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>4</d3p1:Key>
        <d3p1:Value>entity.{ColumnName} = int.Parse({ForeignKeyParentTableName}{ForeignKeyParentColumnName}Input.SelectedValue)</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>5</d3p1:Key>
        <d3p1:Value>
          private void Fill{ColumnName}(DataClasses1DataContext db)
          {
              {ForeignKeyParentTableName}{ForeignKeyParentColumnName}Input.DataSource = db.{ForeignKeyParentTableName}s;
              {ForeignKeyParentTableName}{ForeignKeyParentColumnName}Input.DataTextField = "{ColumnName}Name";
              {ForeignKeyParentTableName}{ForeignKeyParentColumnName}Input.DataValueField = "Id";
              {ForeignKeyParentTableName}{ForeignKeyParentColumnName}Input.DataBind();
          }
        </d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>6</d3p1:Key>
        <d3p1:Value>    Fill{ColumnName}(db);</d3p1:Value>
      </d3p1:KeyValueOfintstring>
    </TemplateReplace>
  </SolutionConfigurationDataTypeTemplate>
  <SolutionConfigurationDataTypeTemplate>
    <DataType>DBDate</DataType>
    <DefaultValueMap xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
    <TemplateIsRequired xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
    <TemplateReplace xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>0</d3p1:Key>
        <d3p1:Value>DateTime</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>1</d3p1:Key>
        <d3p1:Value>{TableName}{ColumnName}Input.Text = entity.{ColumnName}.ToString("dd MMM yyyy")</d3p1:Value>
      </d3p1:KeyValueOfintstring>
      <d3p1:KeyValueOfintstring>
        <d3p1:Key>2</d3p1:Key>
        <d3p1:Value>entity.{ColumnName} = DateTime.Parse({TableName}{ColumnName}Input.Text);</d3p1:Value>
      </d3p1:KeyValueOfintstring>
    </TemplateReplace>
  </SolutionConfigurationDataTypeTemplate>
</ArrayOfSolutionConfigurationDataTypeTemplate>